package cn.stylefeng.guns.modular.tool.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.order.entity.OrderPut;
import cn.stylefeng.guns.modular.order.entity.OrderPutExcelItem;
import cn.stylefeng.guns.modular.order.model.params.OrderPutParam;
import cn.stylefeng.guns.modular.order.model.result.OrderPutResult;
import cn.stylefeng.guns.modular.tool.entity.ToolOrderPut;
import cn.stylefeng.guns.modular.tool.model.params.ToolOrderPutDetailedParam;
import cn.stylefeng.guns.modular.tool.model.params.ToolOrderPutParam;
import cn.stylefeng.guns.modular.tool.model.result.ToolOrderPutResult;
import cn.stylefeng.roses.core.reqres.response.ResponseData;

import com.baomidou.mybatisplus.extension.service.IService;

import java.io.IOException;
import java.util.List;

import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 云仓入库表 服务类
 * </p>
 *
 * @author zhucx
 * @since 2023-04-03
 */
public interface ToolOrderPutService extends IService<ToolOrderPut> {

    /**
     * 新增
     *
     * @author zhucx
     * @Date 2023-04-03
     */
    void add(ToolOrderPutParam param);

    /**
     * 删除
     *
     * @author zhucx
     * @Date 2023-04-03
     */
    void delete(ToolOrderPutParam param);

    /**
     * 更新
     *
     * @author zhucx
     * @Date 2023-04-03
     */
    void update(ToolOrderPutParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author zhucx
     * @Date 2023-04-03
     */
    ToolOrderPutResult findBySpec(ToolOrderPutParam param,Long operateId);

    /**
     * 查询列表，Specification模式
     *
     * @author zhucx
     * @Date 2023-04-03
     */
    List<ToolOrderPutResult> findListBySpec(ToolOrderPutParam param);
	OrderPutResult findBySpecNew(OrderPutParam param, Long operateId);
    /**
     * 查询分页数据，Specification模式
     *
     * @author zhucx
     * @Date 2023-04-03
     */
     LayuiPageInfo findPageBySpec(ToolOrderPutParam param,String condition,Long operateId);

 	/**
 	 * 校验客户单号 是否存在
 	 * @param putCustomerNumber
 	 * @return
 	 */
 	boolean checkCustomerOrder(String putCustomerNumber);

 	ToolOrderPut findByThelastone();

	/**
	 * 处理导入数据
	 * @param file
	 * @param data
	 * @return
	 * @throws IOException 
	 */
	ResponseData getExceldata(MultipartFile file, ToolOrderPutParam param,ResponseData data) throws Exception;

    boolean saveBatchList(List<ToolOrderPutParam> list);

	ResponseData savePulljstputorder(ToolOrderPutParam toolOrderPutParam, List<OrderPutExcelItem> list);

	ResponseData savePulljstreturngoods(ToolOrderPutParam toolOrderPutParam, List<OrderPutExcelItem> list);

	ResponseData savePulljstputorderNew(ToolOrderPutParam toolOrderPutParam, List<OrderPutExcelItem> list);
}
